import request from "@/utils/request-inspection";

// ---------------------------------------------------管点-------------------------------------------------
class DangerAPI {
  // 查询
  static api_query(data: any) {
    return request({
      url: "/api/insp-danger/page",
      method: "get",
      params: data,
    });
  }

  // 查询 隐患 分布 区域
  static api_query_region(data: any) {
    return request({
      url: "/api/insp-danger/danger-region",
      method: "get",
      params: data,
    });
  }

  // 去处理
  static api_handle(data: any) {
    return request({
      url: "/api/insp-danger/handle",
      method: "post",
      data,
    });
  }

  // 查询 隐患 分布
  static api_query_count(data: any) {
    return request({
      url: "/api/insp-danger/danger-region-count",
      method: "get",
      params: data,
    });
  }

  // 查询 隐患 分布 数量
  static api_query_count_detail(data: any) {
    return request({
      url: "/api/insp-danger/danger-region",
      method: "get",
      params: data,
    });
  }

  // 详情
  static api_detail(id: number) {
    return request({
      url: "/api/GisPointInfo/DetailsAsync?Id=" + id,
      method: "post",
    });
  }

  // 详情
  static api_del(id: number) {
    return request({
      url: "/api/insp-danger/" + id,
      method: "delete",
    });
  }

  // 今日巡线人员
  static api_insp_position(data) {
    return request({
      url: "/api/inspection-dashboard/today-insp-user",
      method: "get",
      params: data,
    });
  }

  // 今日巡线人员
  static api_insp_task_user(data) {
    return request({
      url: "/api/insp-task/today-insp-user",
      method: "get",
      params: data,
    });
  }

  // 根据任务查询轨迹
  static api_query_positon_by_task(data) {
    return request({
      url: "/api/position/list",
      method: "get",
      params: data,
    });
  }

  // 巡检人员所有轨迹信息
  static api_insp_task_user_position(data) {
    return request({
      url: "/api/insp-task/insp-user-position",
      method: "get",
      params: data,
    });
  }
}
export default DangerAPI;
